.clearfix {
	*zoom: 1;
	:after {content: '\20';display: block;height: 0;clear: both;}
}

@formv_input_width : 53%;
@formh_input_width : 64%;
@formh_margin : 2%;

/* Form layout */
.formv, .formh{
	position: relative;
	.clearfix;

	.holder, .buttonholder{ 
		clear: both;
		vertical-align:top;
		.clearfix;
	}
	
	label, button{ 
		cursor: pointer;
	}
}

.formv, .formh {

	label, .label{
		display: block;
		float: none;
		margin: 0 0 0.5em 0;
		padding: 0;
		line-height: 100%;
		text-align:left;
		vertical-align:top;
		/* Microsoft YaHei will have font height issue under IE6,7 */
		font-family:Verdana, Helvetica, Arial, sans-serif;
	}
	
    .textinput, .fileupload, .select, select, textarea{
		float: left;
    	margin: 0;
    	width: @formv_input_width;
    }

	.textinput.auto, .fileupload.auto, .select.auto, select.auto, textarea.auto{
		width:auto;
	}
    
    .formhint{
		float: right;
    	width: 96% - @formv_input_width;
    	margin: 0;
    	clear: none;
		vertical-align:top;
    }
    
    label em, .label em{
		float: left;
    	width: 1em;
    	margin: 0 0 0 -1em;
		position:relative;
    }
    
    ul.labels{
		float: left;
    	width: @formv_input_width;
    	margin: 0;
    	padding: 0;
    	
    	.textinput, .select, select{
    		width: 98%;
    		margin-top: 0.5em;
    		display: block;
    		float: none;
    	}
    }
    
    ul.labels li{
    	margin: 0 0 .5em 0;
    	list-style: none;
    }
    
    ul.labels li label{
    	margin: 0;
    	float: none;
    	display: block;
    	overflow: visible;
    }
    
    ul.alternate li{ 
		float: left;
		width: 30%;
		margin-right: 3%;
	}
    ul.alternate li label{
		float: none;
		display: block;
		width: 98%;
	}
    

	.buttonholder label{
		display: inline-block;
		zoom: 1;
		*display: inline;
		margin: 0.5em 0 0 0;
		width: auto;
		max-width: 60%;
		text-align: left;
	}

	.back {
		float:left;
	}
}

.formh {

	label, .label {
		float: left;
		margin: 0.3em @formh_margin 0 0;
		padding: 0;
		line-height: 1;
		width: 100% - @formh_input_width - @formh_margin * 2;
		position:relative;
	}
	
    .textinput, .fileupload, .select, select, textarea{
		float: left;
    	width: @formh_input_width;
    }
    
    .formhint{
    	clear: both;
    	float: none;
    	width: auto;
    	margin-left: 100% - @formh_input_width - @formh_margin;
		position: static;
    }

    ul.labels{ 
		float: left;
		width: @formh_input_width + @formh_margin;
	}

	ul.labels label, ul.labels .label {
		width:100%;
	}

    .holder.nolabel ul.labels{ 
    	margin-left: 100% - @formh_input_width - @formh_margin;
	}
	
    
    label em, .label em{ 
		display: block;
		float: none;
		margin: 0;
		position: absolute;
		right: 0;
	}
}

.formh.labelright{
	label, .label{
		text-align: right;
	}

	ul.labels label, ul.labels .label {
		text-align: left;
	}

    label em, .label em{ 
		display:inline;
		position: static;
	}
}

.formv.fullwidth {
    .textinput, .fileupload, .select, select, textarea{
    	width: 100%;
    }
    .formhint{
		float: left;
    	width: 100%;
    }
}
